home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
COMPILER
/
SATHER
/
!Sather
/
Library
/
Base
/
test
/
sa
/
fltd
< prev
next >
Wrap
Text File
|
1996-04-09
|
1KB
|
31 lines
---------------------------> Sather 1.1 source file <--------------------------
-- test_fltd.sa:
-- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>
-- Copyright (C) 1995, International Computer Science Institute
-- $Id: fltd_test.sa,v 1.2 1996/04/09 10:04:22 borisv Exp $
--
-- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
-- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
-- LICENSE contained in the file: Sather/Doc/License of the
-- Sather distribution. The license is also available from ICSI,
-- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
-------------------------------------------------------------------
class TEST_FLTD_OUTPUT is
include TEST;
main is
class_name("FLTD_OUTPUT");
test("str 1",(0.1234567d).str,"0.123457"); -- ok? davids or om must
-- verify that this is the desired behaviour.
test("str prec=2",(-1234.12345d).str(2),"-1.2e+03");
test("str prec=3",(-1234.12345d).str(3),"-1.23e+03");
test("str prec=4",(1234.12345d).str(4),"1234");
test("str prec=5",(1234.12345d).str(5),"1234.1");
test("str prec=6",(1234.12345d).str(6),"1234.12");
finish;
end;
end; -- class TEST_FLTD
-------------------------------------------------------------------